<?php

$sContent = '';

foreach($oMedia as $vKey => $vVal) {
	if (is_numeric($vVal) === false)
	{
		$vVal = '"'.$vVal.'"';	
	}
	
	$sContent .= '"'.$vKey.'":'.$vVal.',';
}

$sContent = substr($sContent, 0, -1);

$sContent = '{'.$sContent.'}';

echo $sContent;

?>